fix(cli): accept required body fields from flags#85
Closed
ysyneu wants to merge 1 commit into
Closed
Conversation
ysyneu
commented
Jul 15, 2026
ysyneu
left a comment
Contributor
Author
There was a problem hiding this comment.
Review blockers(P2):1)CLI 已接受 typed flag/--data 替代 positional,但 skilldoc generator/validator 仍按 Use 将这些 flag 隐藏或判为 positional-as-flag,随包指南与真实 CLI 契约冲突;2)任意非空 --data 都被视为满足必填字段,--data {} 或不含目标字段的 JSON 会绕过 120 个 validator,包括 mutation 命令。请统一命令元数据、skilldoc 生成/校验/卡片,并解析 --data 验证目标字段存在,补负例测试后再合并。
Contributor
Author
|
关闭:该 PR 同时留下两类契约缺口:CLI 接受 typed flags/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--dataAudit evidence
Production sessions exposed version-skew around
channel escalate-rule-list: the command help advertised--channel-id, while the target branch positional validator rejected that source before request assembly. The same contradiction affected every generated required body field.Verification
make GOLANGCI_LINT=/tmp/fc-safari-audit-tools/golangci-lint-current(fmt, lint, race tests, build)make check-cards--data/simplify --uncommitted/review-to-main --uncommitted/review-to-main